﻿
namespace NetROS.Tiers.Windows.Forms
{
	/// <summary>
	/// abstract KlijentBankovniRacun typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class KlijentBankovniRacunDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<KlijentBankovniRacunDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.KlijentBankovniRacun _currentKlijentBankovniRacun = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxKlijentBankovniRacunDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxKlijentBankovniRacunErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxKlijentBankovniRacunBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the ID property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDKlijent property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDKlijentDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the ZiroRacun property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxZiroRacunDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the IBAN property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIBANDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the SWIFT property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxSWIFTDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Ostalo property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxOstaloDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the IsDefault property
		/// </summary>
		protected System.Windows.Forms.DataGridViewCheckBoxColumn uxIsDefaultDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Calculated property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxCalculatedDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.Klijent> _IDKlijentList;
		
		/// <summary> 
		/// The list of selectable Klijent
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Klijent> IDKlijentList
		{
			get {return this._IDKlijentList;}
			set 
			{
				this._IDKlijentList = value;
				this.uxIDKlijentDataGridViewColumn.DataSource = null;
				this.uxIDKlijentDataGridViewColumn.DataSource = this._IDKlijentList;
			}
		}
		
		private bool _allowNewItemInIDKlijentList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Klijent
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDKlijentList
		{
			get { return _allowNewItemInIDKlijentList;}
			set
			{
				this._allowNewItemInIDKlijentList = value;
				this.uxIDKlijentDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.KlijentBankovniRacun> _KlijentBankovniRacunList;
				
		/// <summary> 
		/// The list of KlijentBankovniRacun to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.KlijentBankovniRacun> KlijentBankovniRacunList
		{
			get {return this._KlijentBankovniRacunList;}
			set
			{
				this._KlijentBankovniRacunList = value;
				this.uxKlijentBankovniRacunBindingSource.DataSource = null;
				this.uxKlijentBankovniRacunBindingSource.DataSource = value;
				this.uxKlijentBankovniRacunDataGridView.DataSource = null;
				this.uxKlijentBankovniRacunDataGridView.DataSource = this.uxKlijentBankovniRacunBindingSource;				
				//this.uxKlijentBankovniRacunBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxKlijentBankovniRacunBindingSource_ListChanged);
				this.uxKlijentBankovniRacunBindingSource.CurrentItemChanged += new System.EventHandler(OnKlijentBankovniRacunBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnKlijentBankovniRacunBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentKlijentBankovniRacun = uxKlijentBankovniRacunBindingSource.Current as Entities.KlijentBankovniRacun;
			
			if (_currentKlijentBankovniRacun != null)
			{
				_currentKlijentBankovniRacun.Validate();
			}
			//_KlijentBankovniRacun.Validate();
			OnCurrentEntityChanged();
		}

		//void uxKlijentBankovniRacunBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.KlijentBankovniRacun"/> instance.
		/// </summary>
		public Entities.KlijentBankovniRacun SelectedKlijentBankovniRacun
		{
			get {return this._currentKlijentBankovniRacun;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxKlijentBankovniRacunDataGridView.VirtualMode;}
			set
			{
				this.uxKlijentBankovniRacunDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxKlijentBankovniRacunDataGridView.AllowUserToAddRows;}
			set {this.uxKlijentBankovniRacunDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxKlijentBankovniRacunDataGridView.AllowUserToDeleteRows;}
			set {this.uxKlijentBankovniRacunDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxKlijentBankovniRacunDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxKlijentBankovniRacunDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="KlijentBankovniRacunDataGridViewBase"/> class.
		/// </summary>
		public KlijentBankovniRacunDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxKlijentBankovniRacunDataGridView = new System.Windows.Forms.DataGridView();
			this.uxKlijentBankovniRacunBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxKlijentBankovniRacunErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDKlijentDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxZiroRacunDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIBANDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxSWIFTDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxOstaloDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIsDefaultDataGridViewColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
			this.uxCalculatedDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			//this.uxIDKlijentBindingSource = new KlijentBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDKlijentBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxKlijentBankovniRacunDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxKlijentBankovniRacunBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxKlijentBankovniRacunErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxKlijentBankovniRacunErrorProvider
			// 
			this.uxKlijentBankovniRacunErrorProvider.ContainerControl = this;
			this.uxKlijentBankovniRacunErrorProvider.DataSource = this.uxKlijentBankovniRacunBindingSource;						
			// 
			// uxKlijentBankovniRacunDataGridView
			// 
			this.uxKlijentBankovniRacunDataGridView.AutoGenerateColumns = false;
			this.uxKlijentBankovniRacunDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxKlijentBankovniRacunDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDDataGridViewColumn,
		this.uxIDKlijentDataGridViewColumn,
		this.uxZiroRacunDataGridViewColumn,
		this.uxIBANDataGridViewColumn,
		this.uxSWIFTDataGridViewColumn,
		this.uxOstaloDataGridViewColumn,
		this.uxIsDefaultDataGridViewColumn,
		this.uxCalculatedDataGridViewColumn			});
			this.uxKlijentBankovniRacunDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxKlijentBankovniRacunDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxKlijentBankovniRacunDataGridView.Name = "uxKlijentBankovniRacunDataGridView";
			this.uxKlijentBankovniRacunDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxKlijentBankovniRacunDataGridView.TabIndex = 0;	
			this.uxKlijentBankovniRacunDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxKlijentBankovniRacunDataGridView.EnableHeadersVisualStyles = false;
			this.uxKlijentBankovniRacunDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnKlijentBankovniRacunDataGridViewDataError);
			this.uxKlijentBankovniRacunDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnKlijentBankovniRacunDataGridViewCellValueNeeded);
			this.uxKlijentBankovniRacunDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnKlijentBankovniRacunDataGridViewCellValuePushed);
			
			//
			// uxIDDataGridViewColumn
			//
			this.uxIDDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDataGridViewColumn.DataPropertyName = "ID";
			this.uxIDDataGridViewColumn.HeaderText = "ID";
			this.uxIDDataGridViewColumn.Name = "uxIDDataGridViewColumn";
			this.uxIDDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDataGridViewColumn.ReadOnly = true;		
			//
			// uxIDKlijentDataGridViewColumn
			//
			this.uxIDKlijentDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDKlijentDataGridViewColumn.DataPropertyName = "IDKlijent";
			this.uxIDKlijentDataGridViewColumn.HeaderText = "IDKlijent";
			this.uxIDKlijentDataGridViewColumn.Name = "uxIDKlijentDataGridViewColumn";
			this.uxIDKlijentDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDKlijentDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDKlijentDataGridViewColumn.ReadOnly = false;		
			//
			// uxZiroRacunDataGridViewColumn
			//
			this.uxZiroRacunDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxZiroRacunDataGridViewColumn.DataPropertyName = "ZiroRacun";
			this.uxZiroRacunDataGridViewColumn.HeaderText = "ZiroRacun";
			this.uxZiroRacunDataGridViewColumn.Name = "uxZiroRacunDataGridViewColumn";
			this.uxZiroRacunDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxZiroRacunDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxZiroRacunDataGridViewColumn.ReadOnly = false;		
			//
			// uxIBANDataGridViewColumn
			//
			this.uxIBANDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIBANDataGridViewColumn.DataPropertyName = "IBAN";
			this.uxIBANDataGridViewColumn.HeaderText = "IBAN";
			this.uxIBANDataGridViewColumn.Name = "uxIBANDataGridViewColumn";
			this.uxIBANDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIBANDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIBANDataGridViewColumn.ReadOnly = false;		
			//
			// uxSWIFTDataGridViewColumn
			//
			this.uxSWIFTDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxSWIFTDataGridViewColumn.DataPropertyName = "SWIFT";
			this.uxSWIFTDataGridViewColumn.HeaderText = "SWIFT";
			this.uxSWIFTDataGridViewColumn.Name = "uxSWIFTDataGridViewColumn";
			this.uxSWIFTDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxSWIFTDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxSWIFTDataGridViewColumn.ReadOnly = false;		
			//
			// uxOstaloDataGridViewColumn
			//
			this.uxOstaloDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxOstaloDataGridViewColumn.DataPropertyName = "Ostalo";
			this.uxOstaloDataGridViewColumn.HeaderText = "Ostalo";
			this.uxOstaloDataGridViewColumn.Name = "uxOstaloDataGridViewColumn";
			this.uxOstaloDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxOstaloDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxOstaloDataGridViewColumn.ReadOnly = false;		
			//
			// uxIsDefaultDataGridViewColumn
			//
			this.uxIsDefaultDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIsDefaultDataGridViewColumn.DataPropertyName = "IsDefault";
			this.uxIsDefaultDataGridViewColumn.HeaderText = "IsDefault";
			this.uxIsDefaultDataGridViewColumn.Name = "uxIsDefaultDataGridViewColumn";
			this.uxIsDefaultDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIsDefaultDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIsDefaultDataGridViewColumn.ReadOnly = false;		
			//
			// uxCalculatedDataGridViewColumn
			//
			this.uxCalculatedDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxCalculatedDataGridViewColumn.DataPropertyName = "Calculated";
			this.uxCalculatedDataGridViewColumn.HeaderText = "Calculated";
			this.uxCalculatedDataGridViewColumn.Name = "uxCalculatedDataGridViewColumn";
			this.uxCalculatedDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxCalculatedDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxCalculatedDataGridViewColumn.ReadOnly = true;		
			//
			// uxIDKlijentDataGridViewColumn
			//				
			this.uxIDKlijentDataGridViewColumn.DisplayMember = "ImeKlijenta";	
			this.uxIDKlijentDataGridViewColumn.ValueMember = "ID";	
			this.uxIDKlijentDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDKlijentDataGridViewColumn.DataSource = uxIDKlijentBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxKlijentBankovniRacunDataGridView);
			this.Name = "KlijentBankovniRacunDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDKlijentBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxKlijentBankovniRacunErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxKlijentBankovniRacunDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxKlijentBankovniRacunBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				KlijentBankovniRacunDataGridViewEventArgs args = new KlijentBankovniRacunDataGridViewEventArgs();
				args.KlijentBankovniRacun = _currentKlijentBankovniRacun;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class KlijentBankovniRacunDataGridViewEventArgs : System.EventArgs
		{
			private Entities.KlijentBankovniRacun	_KlijentBankovniRacun;
	
			/// <summary>
			/// the  Entities.KlijentBankovniRacun instance.
			/// </summary>
			public Entities.KlijentBankovniRacun KlijentBankovniRacun
			{
				get { return _KlijentBankovniRacun; }
				set { _KlijentBankovniRacun = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxKlijentBankovniRacunDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnKlijentBankovniRacunDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxKlijentBankovniRacunDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnKlijentBankovniRacunDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxKlijentBankovniRacunDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						e.Value = KlijentBankovniRacunList[e.RowIndex].ID;
						break;
					case "uxIDKlijentDataGridViewColumn":
						e.Value = KlijentBankovniRacunList[e.RowIndex].IDKlijent;
						break;
					case "uxZiroRacunDataGridViewColumn":
						e.Value = KlijentBankovniRacunList[e.RowIndex].ZiroRacun;
						break;
					case "uxIBANDataGridViewColumn":
						e.Value = KlijentBankovniRacunList[e.RowIndex].IBAN;
						break;
					case "uxSWIFTDataGridViewColumn":
						e.Value = KlijentBankovniRacunList[e.RowIndex].SWIFT;
						break;
					case "uxOstaloDataGridViewColumn":
						e.Value = KlijentBankovniRacunList[e.RowIndex].Ostalo;
						break;
					case "uxIsDefaultDataGridViewColumn":
						e.Value = KlijentBankovniRacunList[e.RowIndex].IsDefault;
						break;
					case "uxCalculatedDataGridViewColumn":
						e.Value = KlijentBankovniRacunList[e.RowIndex].Calculated;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxKlijentBankovniRacunDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnKlijentBankovniRacunDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxKlijentBankovniRacunDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						KlijentBankovniRacunList[e.RowIndex].ID = (System.Int32)e.Value;
						break;
					case "uxIDKlijentDataGridViewColumn":
						KlijentBankovniRacunList[e.RowIndex].IDKlijent = (System.Int32)e.Value;
						break;
					case "uxZiroRacunDataGridViewColumn":
						KlijentBankovniRacunList[e.RowIndex].ZiroRacun = (System.String)e.Value;
						break;
					case "uxIBANDataGridViewColumn":
						KlijentBankovniRacunList[e.RowIndex].IBAN = (System.String)e.Value;
						break;
					case "uxSWIFTDataGridViewColumn":
						KlijentBankovniRacunList[e.RowIndex].SWIFT = (System.String)e.Value;
						break;
					case "uxOstaloDataGridViewColumn":
						KlijentBankovniRacunList[e.RowIndex].Ostalo = (System.String)e.Value;
						break;
					case "uxIsDefaultDataGridViewColumn":
						KlijentBankovniRacunList[e.RowIndex].IsDefault = (System.Boolean)e.Value;
						break;
					case "uxCalculatedDataGridViewColumn":
						KlijentBankovniRacunList[e.RowIndex].Calculated = (System.Int32?)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
